package com.blankii.androidlibrary.exts

import android.app.Activity
import android.content.Intent


inline fun <reified T : Activity> Activity.startActivity() {
    startActivity(Intent(this, T::class.java))
}

inline fun <reified T : Activity> Activity.startActivity(pair: Pair<String, Int>) {
    val intent = Intent(this, T::class.java)
    intent.putExtra(pair.first, pair.second)
    startActivity(intent)
}

inline fun CharSequence?.notEmpty(): Boolean {
    return this != null && this.isNotEmpty()
}

//inline fun <reified T : Any> String.fromJson(): T {
//    return Gson().fromJson(this, T::class.java)
//}